﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Gx.Model.Entity
{
    [Table("LK_SettlementPayment")]
    public class LKSettlementPayment
    {
        [Key]
        private int _id;
        /// <summary>
        /// Id
        /// </summary>
        [Column("Id")]
        public int Id
        {
            get
            {
                return _id;
            }
            set { _id = value; }
        }


        private string _billNo;
        /// <summary>
        /// 结算单编号
        /// </summary>
        [Column("BillNo")]
        public string BillNo
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_billNo))
                    _billNo = string.Empty;
                return _billNo;
            }
            set { _billNo = value; }
        }


        private System.DateTime _paymentTime;
        /// <summary>
        /// 收款时间
        /// </summary>
        [Column("PaymentTime")]
        public System.DateTime PaymentTime
        {
            get
            {
                if (_paymentTime == DateTime.MinValue)
                {
                    return DateTime.Parse("1911-01-01");
                }
                return _paymentTime;
            }
            set { _paymentTime = value; }
        }


        private int _customerId;
        /// <summary>
        /// 客户Id
        /// </summary>
        [Column("CustomerId")]
        public int CustomerId
        {
            get
            {
                return _customerId;
            }
            set { _customerId = value; }
        }


        private string _customerNo;
        /// <summary>
        /// 客户编号
        /// </summary>
        [Column("CustomerNo")]
        public string CustomerNo
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_customerNo))
                    _customerNo = string.Empty;
                return _customerNo;
            }
            set { _customerNo = value; }
        }


        private string _customerName;
        /// <summary>
        /// 客户名称
        /// </summary>
        [Column("CustomerName")]
        public string CustomerName
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_customerName))
                    _customerName = string.Empty;
                return _customerName;
            }
            set { _customerName = value; }
        }


        private int _paymentTypeId;
        /// <summary>
        /// 付款方式id
        /// </summary>
        [Column("PaymentTypeId")]
        public int PaymentTypeId
        {
            get
            {
                return _paymentTypeId;
            }
            set { _paymentTypeId = value; }
        }


        private string _paymentType;
        /// <summary>
        /// 付款方式
        /// </summary>
        [Column("PaymentType")]
        public string PaymentType
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_paymentType))
                    _paymentType = string.Empty;
                return _paymentType;
            }
            set { _paymentType = value; }
        }


        private string _bank;
        /// <summary>
        /// 银行
        /// </summary>
        [Column("Bank")]
        public string Bank
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_bank))
                    _bank = string.Empty;
                return _bank;
            }
            set { _bank = value; }
        }


        private string _invoice;
        /// <summary>
        /// 发票
        /// </summary>
        [Column("Invoice")]
        public string Invoice
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_invoice))
                    _invoice = string.Empty;
                return _invoice;
            }
            set { _invoice = value; }
        }


        private decimal _preAmount;
        /// <summary>
        /// 预收款余金额
        /// </summary>
        [Column("PreAmount")]
        public decimal PreAmount
        {
            get
            {
                return _preAmount;
            }
            set { _preAmount = value; }
        }


        private decimal _amount;
        /// <summary>
        /// 总金额
        /// </summary>
        [Column("Amount")]
        public decimal Amount
        {
            get
            {
                return _amount;
            }
            set { _amount = value; }
        }


        private decimal _actualAmount;
        /// <summary>
        /// 实收金额
        /// </summary>
        [Column("ActualAmount")]
        public decimal ActualAmount
        {
            get
            {
                return _actualAmount;
            }
            set { _actualAmount = value; }
        }


        private string _remark;
        /// <summary>
        /// 备注
        /// </summary>
        [Column("Remark")]
        public string Remark
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_remark))
                    _remark = string.Empty;
                return _remark;
            }
            set { _remark = value; }
        }


        private bool _isReview;
        /// <summary>
        /// 是否复核
        /// </summary>
        [Column("IsReview")]
        public bool IsReview
        {
            get
            {
                return _isReview;
            }
            set { _isReview = value; }
        }


        private System.DateTime _createTime;
        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("CreateTime")]
        public System.DateTime CreateTime
        {
            get
            {
                if (_createTime == DateTime.MinValue)
                {
                    return DateTime.Parse("1911-01-01");
                }
                return _createTime;
            }
            set { _createTime = value; }
        }


        private int _createUserId;
        /// <summary>
        /// 创建人id
        /// </summary>
        [Column("CreateUserId")]
        public int CreateUserId
        {
            get
            {
                return _createUserId;
            }
            set { _createUserId = value; }
        }


        private string _createUser;
        /// <summary>
        /// 创建人
        /// </summary>
        [Column("CreateUser")]
        public string CreateUser
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_createUser))
                    _createUser = string.Empty;
                return _createUser;
            }
            set { _createUser = value; }
        }


        private int _modifyUserId;
        /// <summary>
        /// 修改人id
        /// </summary>
        [Column("ModifyUserId")]
        public int ModifyUserId
        {
            get
            {
                return _modifyUserId;
            }
            set { _modifyUserId = value; }
        }


        private string _modifyUser;
        /// <summary>
        /// 修改人
        /// </summary>
        [Column("ModifyUser")]
        public string ModifyUser
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_modifyUser))
                    _modifyUser = string.Empty;
                return _modifyUser;
            }
            set { _modifyUser = value; }
        }


        private System.DateTime _modifyTime;
        /// <summary>
        /// 修改时间
        /// </summary>
        [Column("ModifyTime")]
        public System.DateTime ModifyTime
        {
            get
            {
                if (_modifyTime == DateTime.MinValue)
                {
                    return DateTime.Parse("1911-01-01");
                }
                return _modifyTime;
            }
            set { _modifyTime = value; }
        }


        private bool _isDeleted;
        /// <summary>
        /// 是否删除
        /// </summary>
        [Column("IsDeleted")]
        public bool IsDeleted
        {
            get
            {
                return _isDeleted;
            }
            set { _isDeleted = value; }
        }


        private int _companyId;
        /// <summary>
        /// 公司id
        /// </summary>
        [Column("CompanyId")]
        public int CompanyId
        {
            get
            {
                return _companyId;
            }
            set { _companyId = value; }
        }

        private int _reviewerId;
        /// <summary>
        /// 复核人id
        /// </summary>
        [Column("ReviewerId")]
        public int ReviewerId
        {
            get
            {
                return _reviewerId;
            }
            set { _reviewerId = value; }
        }


        private string _reviewer;
        /// <summary>
        /// 复核人
        /// </summary>
        [Column("Reviewer")]
        public string Reviewer
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_reviewer))
                    _reviewer = string.Empty;
                return _reviewer;
            }
            set { _reviewer = value; }
        }


        private System.DateTime _reviewTime;
        /// <summary>
        /// 复核时间
        /// </summary>
        [Column("ReviewerTime")]
        public System.DateTime ReviewTime
        {
            get
            {
                if (_reviewTime == DateTime.MinValue)
                {
                    return DateTime.Parse("1911-01-01");
                }
                return _reviewTime;
            }
            set { _reviewTime = value; }
        }

        private decimal _cashAndBank;
        /// <summary>
        /// 
        /// </summary>
        [Column("CashAndBank")]
        public decimal CashAndBank
        {
            get
            {
                return _cashAndBank;
            }
            set { _cashAndBank = value; }
        }


        private decimal _prePay;
        /// <summary>
        /// 预付款扣除
        /// </summary>
        [Column("PrePay")]
        public decimal PrePay
        {
            get
            {
                return _prePay;
            }
            set { _prePay = value; }
        }

        private decimal _cashDiscount;
        /// <summary>
        /// 现金折扣
        /// </summary>
        [Column("CashDiscount")]
        public decimal CashDiscount
        {
            get
            {
                return _cashDiscount;
            }
            set { _cashDiscount = value; }
        }
    }
}

